package com.learn.sb.kafka.customer;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class KafkaCustomer {

	@KafkaListener(topics = "test-topic")
	public void listen (ConsumerRecord<?, ?> record) throws Exception {
		log.info("recv <== topic = "+record.topic()+", offset = "+record.offset()+", value = " + record.value());
	}

}
